bpo-44098: Drop ParamSpec from most __parameters__ in typing generics#26013
Merged
miss-islington merged 2 commits intopython:mainfrom May 13, 2021
Merged
bpo-44098: Drop ParamSpec from most __parameters__ in typing generics#26013miss-islington merged 2 commits intopython:mainfrom
__parameters__ in typing generics#26013miss-islington merged 2 commits intopython:mainfrom
Conversation
gvanrossum
reviewed
May 12, 2021
gvanrossum
approved these changes
May 13, 2021
Member
gvanrossum
left a comment
There was a problem hiding this comment.
Thanks. Is this back port worthy?
Contributor
|
@Fidget-Spinner: Status check is done, and it's a success ✅ . |
Contributor
|
Thanks @Fidget-Spinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
May 13, 2021
…rics (pythonGH-26013) Added two new attributes to ``_GenericAlias``: * ``_typevar_types``, a single type or tuple of types indicating what types are treated as a ``TypeVar``. Used for ``isinstance`` checks. * ``_paramspec_tvars ``, a boolean flag which guards special behavior for dealing with ``ParamSpec``. Setting it to ``True`` means this class deals with ``ParamSpec``. Automerge-Triggered-By: GH:gvanrossum (cherry picked from commit b2f3f8e) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
GH-26091 is a backport of this pull request to the 3.10 branch. |
Member
Author
Yep (only to 3.10), I added the backport label for that. We need to backport it otherwise the typing generics and builtin generics will have different behaviors. |
gvanrossum
pushed a commit
that referenced
this pull request
May 13, 2021
…rics (GH-26013) (#26091) Added two new attributes to ``_GenericAlias``: * ``_typevar_types``, a single type or tuple of types indicating what types are treated as a ``TypeVar``. Used for ``isinstance`` checks. * ``_paramspec_tvars ``, a boolean flag which guards special behavior for dealing with ``ParamSpec``. Setting it to ``True`` means this class deals with ``ParamSpec``. Automerge-Triggered-By: GH:gvanrossum (cherry picked from commit b2f3f8e)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added two new attributes to
_GenericAlias:_typevar_types, a single type or tuple of types indicating what types are treated as aTypeVar. Used forisinstancechecks._paramspec_tvars, a boolean flag which guards special behavior for dealing withParamSpec. Setting it toTruemeans this class deals withParamSpec.https://bugs.python.org/issue44098
Automerge-Triggered-By: GH:gvanrossum